/*
 *
 *    Copyright (c) 2022 Project CHIP Authors
 *
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */

// THIS FILE IS GENERATED BY ZAP
// This file is generated from clusters-Structs.h.zapt

#pragma once

#include <app/data-model/DecodableList.h>
#include <app/data-model/List.h>
#include <app/data-model/Nullable.h>
#include <lib/core/DataModelTypes.h>
#include <lib/core/Optional.h>
#include <lib/core/TLV.h>
#include <lib/support/BitMask.h>

#include <clusters/shared/Structs.h>

#include <cstdint>

namespace chip
{
namespace app
{
	namespace Clusters
	{
		namespace NetworkCommissioning
		{
			namespace Structs
			{
				namespace NetworkInfoStruct
				{
					enum class Fields : uint8_t {
						kNetworkID = 0,
						kConnected = 1,
						kNetworkIdentifier = 2,
						kClientIdentifier = 3,
					};

					struct Type {
					public:
						chip::ByteSpan networkID;
						bool connected = static_cast<bool>(0);
						Optional<DataModel::Nullable<chip::ByteSpan>> networkIdentifier;
						Optional<DataModel::Nullable<chip::ByteSpan>> clientIdentifier;

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace NetworkInfoStruct
				namespace ThreadInterfaceScanResultStruct
				{
					enum class Fields : uint8_t {
						kPanId = 0,
						kExtendedPanId = 1,
						kNetworkName = 2,
						kChannel = 3,
						kVersion = 4,
						kExtendedAddress = 5,
						kRssi = 6,
						kLqi = 7,
					};

					struct Type {
					public:
						uint16_t panId = static_cast<uint16_t>(0);
						uint64_t extendedPanId = static_cast<uint64_t>(0);
						chip::CharSpan networkName;
						uint16_t channel = static_cast<uint16_t>(0);
						uint8_t version = static_cast<uint8_t>(0);
						chip::ByteSpan extendedAddress;
						int8_t rssi = static_cast<int8_t>(0);
						uint8_t lqi = static_cast<uint8_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace ThreadInterfaceScanResultStruct
				namespace WiFiInterfaceScanResultStruct
				{
					enum class Fields : uint8_t {
						kSecurity = 0,
						kSsid = 1,
						kBssid = 2,
						kChannel = 3,
						kWiFiBand = 4,
						kRssi = 5,
					};

					struct Type {
					public:
						chip::BitMask<WiFiSecurityBitmap> security =
							static_cast<chip::BitMask<WiFiSecurityBitmap>>(0);
						chip::ByteSpan ssid;
						chip::ByteSpan bssid;
						uint16_t channel = static_cast<uint16_t>(0);
						WiFiBandEnum wiFiBand = static_cast<WiFiBandEnum>(0);
						int8_t rssi = static_cast<int8_t>(0);

						CHIP_ERROR Decode(TLV::TLVReader &reader);

						static constexpr bool kIsFabricScoped = false;

						CHIP_ERROR Encode(TLV::TLVWriter &aWriter, TLV::Tag aTag) const;
					};

					using DecodableType = Type;

				} // namespace WiFiInterfaceScanResultStruct
			} // namespace Structs
		} // namespace NetworkCommissioning
	} // namespace Clusters
} // namespace app
} // namespace chip
